package org.play.tdd;

import java.util.ArrayList;
import java.util.List;

public class Library {

	private List<Book> books;
	
	public Library() {
		this.books = new ArrayList<Book>();
	}

	public void register(Book book) {
		books.add(book);
	}

	public Book findById(String id) {
		Book bookFinded = null;
		for(Book book: books)
			if(book.getId().equals(id))
				bookFinded = book;
		return bookFinded;
	}

}
